﻿using System; 
using System.Collections.Generic;

class NYield
{
  private Generator() : IEnumerable[int] {
    for(mutable i=0;i<10;i++) yield i;
  }
  
  public YieldIt() : void {
    foreach(item in Generator())
      Console.Write($"$item ");
    Console.WriteLine();
  }
}